-
-
Notifications
You must be signed in to change notification settings - Fork 637
test: add test cases for complex attributes #2151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
| }) as const, | ||
| ), | ||
| { | ||
| parse: (e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you add a parse function here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the round trip parse tests, this also makes sure that custom blocks will always have priority over the default blocks.
Paragraph would also be able to match this: https://github.com/TypeCellOS/BlockNote/pull/2151/files#diff-f8e7f7017e58c7256b18e4d7b5fe8b4007e0ada0dadadf7306bb232cafbe84fa
So this makes sure that it round-trips back to a custom paragraph
| }, | ||
| ); | ||
|
|
||
| // const ComplexAttributeNode = addNodeAndExtensionsToSpec( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can just add this, right? (without addNodeAndExtensionsToSpec)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add it, it should not use that addNodeAndExtensionstoSpec function. I think I just didn't do it because the type guards weren't passing to get this to work right
Summary
Rationale
Changes
Impact
Testing
Screenshots/Video
Checklist
Additional Notes